package com.rr;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;

/**
 * @author RR
 * @date 2023/3/14 12:26
 */
@SpringBootApplication
// 开启注解使用spring security，使@Secured生效，使@PreAuthorize生效
// @Secured没有@PreAuthorize实用，可以不理@Secured
@EnableGlobalMethodSecurity(securedEnabled = true,prePostEnabled = true)
public class SpringSecurityDemoApplication {
    public static void main(String[] args) {
        SpringApplication.run(SpringSecurityDemoApplication.class, args);
    }
}
